<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Irrlicht 3D Engine: irr::video::SColor Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="irrlichtlogo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Irrlicht 3D Engine
   
   </div>
   
  </td>
  
  
  
   
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="dynsections.js"></script>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('classirr_1_1video_1_1_s_color.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">irr::video::SColor Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="irr::video::SColor" -->
<p>Class representing a 32 bit ARGB color.  
 <a href="classirr_1_1video_1_1_s_color.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_s_color_8h_source.html">SColor.h</a>&gt;</code></p>

<p><a href="classirr_1_1video_1_1_s_color-members.html">List of all members.</a></p>
<h2><a name="pub-methods"></a>
Public Member Functions</h2>
<ul>
<li><a class="el" href="classirr_1_1video_1_1_s_color.html#ab001c0c2515ff5f8a0b324d1345485f4">SColor</a> ()
<dl class="el"><dd class="mdescRight">Constructor of the Color. Does nothing.  <a href="#ab001c0c2515ff5f8a0b324d1345485f4"></a><br/></dl><li><a class="el" href="classirr_1_1video_1_1_s_color.html#aa2ca1fcb9b11375282bb407b635b3dd6">SColor</a> (<a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> a, <a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> r, <a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> g, <a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> b)
<dl class="el"><dd class="mdescRight">Constructs the color from 4 values representing the alpha, red, green and blue component.  <a href="#aa2ca1fcb9b11375282bb407b635b3dd6"></a><br/></dl><li><a class="el" href="classirr_1_1video_1_1_s_color.html#a56dd5677c3e36d3b33d5d796be2597da">SColor</a> (<a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> clr)
<dl class="el"><dd class="mdescRight">Constructs the color from a 32 bit value. Could be another color.  <a href="#a56dd5677c3e36d3b33d5d796be2597da"></a><br/></dl><li><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> <a class="el" href="classirr_1_1video_1_1_s_color.html#a9647d09a9d4b9c6fb48a8fa1f2da425c">getAlpha</a> () const 
<dl class="el"><dd class="mdescRight">Returns the alpha component of the color.  <a href="#a9647d09a9d4b9c6fb48a8fa1f2da425c"></a><br/></dl><li><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> <a class="el" href="classirr_1_1video_1_1_s_color.html#a29a672f4bae9805970b84c4aef81b9ab">getAverage</a> () const 
<dl class="el"><dd class="mdescRight">Get average intensity of the color in the range [0,255].  <a href="#a29a672f4bae9805970b84c4aef81b9ab"></a><br/></dl><li><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> <a class="el" href="classirr_1_1video_1_1_s_color.html#a26fdbde73081b35a1686f8d21a549544">getBlue</a> () const 
<dl class="el"><dd class="mdescRight">Returns the blue component of the color.  <a href="#a26fdbde73081b35a1686f8d21a549544"></a><br/></dl><li>void <a class="el" href="classirr_1_1video_1_1_s_color.html#a7cba1b914230289de9c91ff28be96bc9">getData</a> (void *data, <a class="el" href="namespaceirr_1_1video.html#a1d5e487888c32b1674a8f75116d829ed">ECOLOR_FORMAT</a> format)
<dl class="el"><dd class="mdescRight">Write the color to data in the defined format.  <a href="#a7cba1b914230289de9c91ff28be96bc9"></a><br/></dl><li><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> <a class="el" href="classirr_1_1video_1_1_s_color.html#ad604ba81e061b0bfe2ccb5f16e29124d">getGreen</a> () const 
<dl class="el"><dd class="mdescRight">Returns the green component of the color.  <a href="#ad604ba81e061b0bfe2ccb5f16e29124d"></a><br/></dl><li><a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> <a class="el" href="classirr_1_1video_1_1_s_color.html#a880760bf37e7c2143cc0b1a0e90a85b1">getInterpolated</a> (const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;other, <a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> d) const 
<dl class="el"><dd class="mdescRight">Interpolates the color with a f32 value to another color.  <a href="#a880760bf37e7c2143cc0b1a0e90a85b1"></a><br/></dl><li><a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> <a class="el" href="classirr_1_1video_1_1_s_color.html#a9e3832dd71062d1d200f11b91cd3a104">getInterpolated_quadratic</a> (const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;c1, const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;c2, <a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> d) const 
<dl class="el"><dd class="mdescRight">Returns interpolated color. ( quadratic )  <a href="#a9e3832dd71062d1d200f11b91cd3a104"></a><br/></dl><li><a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> <a class="el" href="classirr_1_1video_1_1_s_color.html#aa96bfc155c181104c61df9d58ad8be0f">getLightness</a> () const 
<dl class="el"><dd class="mdescRight">Get lightness of the color in the range [0,255].  <a href="#aa96bfc155c181104c61df9d58ad8be0f"></a><br/></dl><li><a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> <a class="el" href="classirr_1_1video_1_1_s_color.html#ad0a78b90a97e8444a1d12e93e7e929ba">getLuminance</a> () const 
<dl class="el"><dd class="mdescRight">Get luminance of the color in the range [0,255].  <a href="#ad0a78b90a97e8444a1d12e93e7e929ba"></a><br/></dl><li><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> <a class="el" href="classirr_1_1video_1_1_s_color.html#af10d2deaccbde5c958032ed9ec81b59f">getRed</a> () const 
<dl class="el"><dd class="mdescRight">Returns the red component of the color.  <a href="#af10d2deaccbde5c958032ed9ec81b59f"></a><br/></dl><li>bool <a class="el" href="classirr_1_1video_1_1_s_color.html#abcacfc84b1a87f148570efb176999104">operator!=</a> (const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;other) const 
<dl class="el"><dd class="mdescRight">Compares the color to another color.  <a href="#abcacfc84b1a87f148570efb176999104"></a><br/></dl><li><a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> <a class="el" href="classirr_1_1video_1_1_s_color.html#a1cd25e0e67050af13a15515b7d2c8782">operator+</a> (const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;other) const 
<dl class="el"><dd class="mdescRight">Adds two colors, result is clamped to 0..255 values.  <a href="#a1cd25e0e67050af13a15515b7d2c8782"></a><br/></dl><li>bool <a class="el" href="classirr_1_1video_1_1_s_color.html#a8e7944ddc658076a2933861a1b99f1e7">operator&lt;</a> (const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;other) const 
<dl class="el"><dd class="mdescRight">comparison operator  <a href="#a8e7944ddc658076a2933861a1b99f1e7"></a><br/></dl><li>bool <a class="el" href="classirr_1_1video_1_1_s_color.html#a68025038ef1c75c8b7ca64270216f79f">operator==</a> (const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;other) const 
<dl class="el"><dd class="mdescRight">Compares the color to another color.  <a href="#a68025038ef1c75c8b7ca64270216f79f"></a><br/></dl><li>void <a class="el" href="classirr_1_1video_1_1_s_color.html#a8cf295c05c7406cc249843acbb31ec5f">set</a> (<a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> a, <a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> r, <a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> g, <a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> b)
<dl class="el"><dd class="mdescRight">Sets all four components of the color at once.  <a href="#a8cf295c05c7406cc249843acbb31ec5f"></a><br/></dl><li>void <a class="el" href="classirr_1_1video_1_1_s_color.html#a4966581260a89f10386bf9d06239c341">set</a> (<a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> col)
<li>void <a class="el" href="classirr_1_1video_1_1_s_color.html#a7bfe4abc30d563668b947c8bdb055bab">setAlpha</a> (<a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> a)
<dl class="el"><dd class="mdescRight">Sets the alpha component of the Color.  <a href="#a7bfe4abc30d563668b947c8bdb055bab"></a><br/></dl><li>void <a class="el" href="classirr_1_1video_1_1_s_color.html#a13d82e6b52d32f7394f3cce041dc2965">setBlue</a> (<a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> b)
<dl class="el"><dd class="mdescRight">Sets the blue component of the Color.  <a href="#a13d82e6b52d32f7394f3cce041dc2965"></a><br/></dl><li>void <a class="el" href="classirr_1_1video_1_1_s_color.html#a381f2db0ed17c6b06ba5c8809dce3370">setData</a> (const void *data, <a class="el" href="namespaceirr_1_1video.html#a1d5e487888c32b1674a8f75116d829ed">ECOLOR_FORMAT</a> format)
<dl class="el"><dd class="mdescRight">set the color by expecting data in the given format  <a href="#a381f2db0ed17c6b06ba5c8809dce3370"></a><br/></dl><li>void <a class="el" href="classirr_1_1video_1_1_s_color.html#af80cfedd5e761216b8bed259963ac948">setGreen</a> (<a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> g)
<dl class="el"><dd class="mdescRight">Sets the green component of the Color.  <a href="#af80cfedd5e761216b8bed259963ac948"></a><br/></dl><li>void <a class="el" href="classirr_1_1video_1_1_s_color.html#a950c98714711ae9dd8c5219f83c07693">setRed</a> (<a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> r)
<dl class="el"><dd class="mdescRight">Sets the red component of the Color.  <a href="#a950c98714711ae9dd8c5219f83c07693"></a><br/></dl><li><a class="el" href="namespaceirr.html#ae9f8ec82692ad3b83c21f555bfa70bcc">u16</a> <a class="el" href="classirr_1_1video_1_1_s_color.html#a9a6ad04081a1b15c07746cf84a971565">toA1R5G5B5</a> () const 
<dl class="el"><dd class="mdescRight">Calculates a 16 bit A1R5G5B5 value of this color.  <a href="#a9a6ad04081a1b15c07746cf84a971565"></a><br/></dl><li>void <a class="el" href="classirr_1_1video_1_1_s_color.html#a0196acc3dfded9f6161c41f0065267c1">toOpenGLColor</a> (<a class="el" href="namespaceirr.html#a646874f69af8ff87fc10201b0254a761">u8</a> *dest) const 
<dl class="el"><dd class="mdescRight">Converts color to OpenGL color format.  <a href="#a0196acc3dfded9f6161c41f0065267c1"></a><br/></dl></ul>
<h2><a name="pub-attribs"></a>
Public Attributes</h2>
<ul>
<li><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> <a class="el" href="classirr_1_1video_1_1_s_color.html#a11f2b41eeff9e7f688d322735ca2cfcf">color</a>
<dl class="el"><dd class="mdescRight">color in A8R8G8B8 Format  <a href="#a11f2b41eeff9e7f688d322735ca2cfcf"></a><br/></dl></ul>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Class representing a 32 bit ARGB color. </p>
<p>The color values for alpha, red, green, and blue are stored in a single u32. So all four values may be between 0 and 255. Alpha in Irrlicht is opacity, so 0 is fully transparent, 255 is fully opaque (solid). This class is used by most parts of the Irrlicht Engine to specify a color. Another way is using the class <a class="el" href="classirr_1_1video_1_1_s_colorf.html" title="Class representing a color with four floats.">SColorf</a>, which stores the color values in 4 floats. This class must consist of only one u32 and must not use virtual functions. </p>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00201">201</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab001c0c2515ff5f8a0b324d1345485f4"></a><!-- doxytag: member="irr::video::SColor::SColor" ref="ab001c0c2515ff5f8a0b324d1345485f4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">irr::video::SColor::SColor </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor of the Color. Does nothing. </p>
<p>The color value is not initialized to save time. </p>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00207">207</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>Referenced by <a class="el" href="_s_color_8h_source.html#l00340">getInterpolated()</a>, <a class="el" href="_s_color_8h_source.html#l00354">getInterpolated_quadratic()</a>, and <a class="el" href="_s_color_8h_source.html#l00328">operator+()</a>.</p>

</div>
</div>
<a class="anchor" id="aa2ca1fcb9b11375282bb407b635b3dd6"></a><!-- doxytag: member="irr::video::SColor::SColor" ref="aa2ca1fcb9b11375282bb407b635b3dd6" args="(u32 a, u32 r, u32 g, u32 b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">irr::video::SColor::SColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs the color from 4 values representing the alpha, red, green and blue component. </p>
<p>Must be values between 0 and 255. </p>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00211">211</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

</div>
</div>
<a class="anchor" id="a56dd5677c3e36d3b33d5d796be2597da"></a><!-- doxytag: member="irr::video::SColor::SColor" ref="a56dd5677c3e36d3b33d5d796be2597da" args="(u32 clr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">irr::video::SColor::SColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>clr</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs the color from a 32 bit value. Could be another color. </p>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00215">215</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a9647d09a9d4b9c6fb48a8fa1f2da425c"></a><!-- doxytag: member="irr::video::SColor::getAlpha" ref="a9647d09a9d4b9c6fb48a8fa1f2da425c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> irr::video::SColor::getAlpha </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the alpha component of the color. </p>
<p>The alpha component defines how opaque a color is. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The alpha value of the color. 0 is fully transparent, 255 is fully opaque. </dd></dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00221">221</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

<p>Referenced by <a class="el" href="_s_color_8h_source.html#l00340">getInterpolated()</a>, <a class="el" href="_s_color_8h_source.html#l00354">getInterpolated_quadratic()</a>, <a class="el" href="_s_color_8h_source.html#l00328">operator+()</a>, <a class="el" href="_s_color_8h_source.html#l00481">irr::video::SColorf::SColorf()</a>, and <a class="el" href="_s_color_8h_source.html#l00284">toOpenGLColor()</a>.</p>

</div>
</div>
<a class="anchor" id="a29a672f4bae9805970b84c4aef81b9ab"></a><!-- doxytag: member="irr::video::SColor::getAverage" ref="a29a672f4bae9805970b84c4aef81b9ab" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> irr::video::SColor::getAverage </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get average intensity of the color in the range [0,255]. </p>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00251">251</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00236">getBlue()</a>, <a class="el" href="_s_color_8h_source.html#l00231">getGreen()</a>, and <a class="el" href="_s_color_8h_source.html#l00226">getRed()</a>.</p>

</div>
</div>
<a class="anchor" id="a26fdbde73081b35a1686f8d21a549544"></a><!-- doxytag: member="irr::video::SColor::getBlue" ref="a26fdbde73081b35a1686f8d21a549544" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> irr::video::SColor::getBlue </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the blue component of the color. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Value between 0 and 255, specifying how blue the color is. 0 means no blue, 255 means full blue. </dd></dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00236">236</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

<p>Referenced by <a class="el" href="_s_color_8h_source.html#l00251">getAverage()</a>, <a class="el" href="_s_color_8h_source.html#l00407">getData()</a>, <a class="el" href="_s_color_8h_source.html#l00340">getInterpolated()</a>, <a class="el" href="_s_color_8h_source.html#l00354">getInterpolated_quadratic()</a>, <a class="el" href="_s_color_8h_source.html#l00239">getLightness()</a>, <a class="el" href="_s_color_8h_source.html#l00245">getLuminance()</a>, <a class="el" href="_s_color_8h_source.html#l00328">operator+()</a>, <a class="el" href="_s_color_8h_source.html#l00481">irr::video::SColorf::SColorf()</a>, and <a class="el" href="_s_color_8h_source.html#l00284">toOpenGLColor()</a>.</p>

</div>
</div>
<a class="anchor" id="a7cba1b914230289de9c91ff28be96bc9"></a><!-- doxytag: member="irr::video::SColor::getData" ref="a7cba1b914230289de9c91ff28be96bc9" args="(void *data, ECOLOR_FORMAT format)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void irr::video::SColor::getData </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr_1_1video.html#a1d5e487888c32b1674a8f75116d829ed">ECOLOR_FORMAT</a>&#160;</td>
          <td class="paramname"><em>format</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write the color to data in the defined format. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">data,:</td><td>target to write the color. Must contain sufficiently large memory to receive the number of bytes neede for format </td></tr>
    <tr><td class="paramname">format,:</td><td>tells the format used to write the color into data </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00407">407</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00097">irr::video::A8R8G8B8toA1R5G5B5()</a>, <a class="el" href="_s_color_8h_source.html#l00107">irr::video::A8R8G8B8toR5G6B5()</a>, <a class="el" href="_s_color_8h_source.html#l00447">color</a>, <a class="el" href="_s_color_8h_source.html#l00023">irr::video::ECF_A1R5G5B5</a>, <a class="el" href="_s_color_8h_source.html#l00032">irr::video::ECF_A8R8G8B8</a>, <a class="el" href="_s_color_8h_source.html#l00026">irr::video::ECF_R5G6B5</a>, <a class="el" href="_s_color_8h_source.html#l00029">irr::video::ECF_R8G8B8</a>, <a class="el" href="_s_color_8h_source.html#l00236">getBlue()</a>, <a class="el" href="_s_color_8h_source.html#l00231">getGreen()</a>, and <a class="el" href="_s_color_8h_source.html#l00226">getRed()</a>.</p>

</div>
</div>
<a class="anchor" id="ad604ba81e061b0bfe2ccb5f16e29124d"></a><!-- doxytag: member="irr::video::SColor::getGreen" ref="ad604ba81e061b0bfe2ccb5f16e29124d" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> irr::video::SColor::getGreen </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the green component of the color. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Value between 0 and 255, specifying how green the color is. 0 means no green, 255 means full green. </dd></dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00231">231</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

<p>Referenced by <a class="el" href="_s_color_8h_source.html#l00251">getAverage()</a>, <a class="el" href="_s_color_8h_source.html#l00407">getData()</a>, <a class="el" href="_s_color_8h_source.html#l00340">getInterpolated()</a>, <a class="el" href="_s_color_8h_source.html#l00354">getInterpolated_quadratic()</a>, <a class="el" href="_s_color_8h_source.html#l00239">getLightness()</a>, <a class="el" href="_s_color_8h_source.html#l00245">getLuminance()</a>, <a class="el" href="_s_color_8h_source.html#l00328">operator+()</a>, <a class="el" href="_s_color_8h_source.html#l00481">irr::video::SColorf::SColorf()</a>, and <a class="el" href="_s_color_8h_source.html#l00284">toOpenGLColor()</a>.</p>

</div>
</div>
<a class="anchor" id="a880760bf37e7c2143cc0b1a0e90a85b1"></a><!-- doxytag: member="irr::video::SColor::getInterpolated" ref="a880760bf37e7c2143cc0b1a0e90a85b1" args="(const SColor &amp;other, f32 d) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> irr::video::SColor::getInterpolated </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a>&#160;</td>
          <td class="paramname"><em>d</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Interpolates the color with a f32 value to another color. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">other,:</td><td>Other color </td></tr>
    <tr><td class="paramname">d,:</td><td>value between 0.0f and 1.0f </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Interpolated color. </dd></dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00340">340</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="irr_math_8h_source.html#l00166">irr::core::clamp()</a>, <a class="el" href="_s_color_8h_source.html#l00221">getAlpha()</a>, <a class="el" href="_s_color_8h_source.html#l00236">getBlue()</a>, <a class="el" href="_s_color_8h_source.html#l00231">getGreen()</a>, <a class="el" href="_s_color_8h_source.html#l00226">getRed()</a>, <a class="el" href="irr_math_8h_source.html#l00680">irr::core::round32()</a>, and <a class="el" href="_s_color_8h_source.html#l00207">SColor()</a>.</p>

<p>Referenced by <a class="el" href="_s3_d_vertex_8h_source.html#l00093">irr::video::S3DVertex::getInterpolated()</a>, <a class="el" href="_s3_d_vertex_8h_source.html#l00171">irr::video::S3DVertex2TCoords::getInterpolated()</a>, and <a class="el" href="_s3_d_vertex_8h_source.html#l00242">irr::video::S3DVertexTangents::getInterpolated()</a>.</p>

</div>
</div>
<a class="anchor" id="a9e3832dd71062d1d200f11b91cd3a104"></a><!-- doxytag: member="irr::video::SColor::getInterpolated_quadratic" ref="a9e3832dd71062d1d200f11b91cd3a104" args="(const SColor &amp;c1, const SColor &amp;c2, f32 d) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> irr::video::SColor::getInterpolated_quadratic </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;&#160;</td>
          <td class="paramname"><em>c1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;&#160;</td>
          <td class="paramname"><em>c2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a>&#160;</td>
          <td class="paramname"><em>d</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns interpolated color. ( quadratic ) </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">c1,:</td><td>first color to interpolate with </td></tr>
    <tr><td class="paramname">c2,:</td><td>second color to interpolate with </td></tr>
    <tr><td class="paramname">d,:</td><td>value between 0.0f and 1.0f. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00354">354</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="irr_math_8h_source.html#l00166">irr::core::clamp()</a>, <a class="el" href="irr_math_8h_source.html#l00613">irr::core::floor32()</a>, <a class="el" href="_s_color_8h_source.html#l00221">getAlpha()</a>, <a class="el" href="_s_color_8h_source.html#l00236">getBlue()</a>, <a class="el" href="_s_color_8h_source.html#l00231">getGreen()</a>, <a class="el" href="_s_color_8h_source.html#l00226">getRed()</a>, and <a class="el" href="_s_color_8h_source.html#l00207">SColor()</a>.</p>

</div>
</div>
<a class="anchor" id="aa96bfc155c181104c61df9d58ad8be0f"></a><!-- doxytag: member="irr::video::SColor::getLightness" ref="aa96bfc155c181104c61df9d58ad8be0f" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> irr::video::SColor::getLightness </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get lightness of the color in the range [0,255]. </p>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00239">239</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00236">getBlue()</a>, <a class="el" href="_s_color_8h_source.html#l00231">getGreen()</a>, <a class="el" href="_s_color_8h_source.html#l00226">getRed()</a>, <a class="el" href="irr_math_8h_source.html#l00137">irr::core::max_()</a>, and <a class="el" href="irr_math_8h_source.html#l00123">irr::core::min_()</a>.</p>

</div>
</div>
<a class="anchor" id="ad0a78b90a97e8444a1d12e93e7e929ba"></a><!-- doxytag: member="irr::video::SColor::getLuminance" ref="ad0a78b90a97e8444a1d12e93e7e929ba" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07">f32</a> irr::video::SColor::getLuminance </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get luminance of the color in the range [0,255]. </p>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00245">245</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00236">getBlue()</a>, <a class="el" href="_s_color_8h_source.html#l00231">getGreen()</a>, and <a class="el" href="_s_color_8h_source.html#l00226">getRed()</a>.</p>

</div>
</div>
<a class="anchor" id="af10d2deaccbde5c958032ed9ec81b59f"></a><!-- doxytag: member="irr::video::SColor::getRed" ref="af10d2deaccbde5c958032ed9ec81b59f" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> irr::video::SColor::getRed </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the red component of the color. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Value between 0 and 255, specifying how red the color is. 0 means no red, 255 means full red. </dd></dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00226">226</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

<p>Referenced by <a class="el" href="_s_color_8h_source.html#l00251">getAverage()</a>, <a class="el" href="_s_color_8h_source.html#l00407">getData()</a>, <a class="el" href="_s_color_8h_source.html#l00340">getInterpolated()</a>, <a class="el" href="_s_color_8h_source.html#l00354">getInterpolated_quadratic()</a>, <a class="el" href="_s_color_8h_source.html#l00239">getLightness()</a>, <a class="el" href="_s_color_8h_source.html#l00245">getLuminance()</a>, <a class="el" href="_s_color_8h_source.html#l00328">operator+()</a>, <a class="el" href="_s_color_8h_source.html#l00481">irr::video::SColorf::SColorf()</a>, and <a class="el" href="_s_color_8h_source.html#l00284">toOpenGLColor()</a>.</p>

</div>
</div>
<a class="anchor" id="abcacfc84b1a87f148570efb176999104"></a><!-- doxytag: member="irr::video::SColor::operator!=" ref="abcacfc84b1a87f148570efb176999104" args="(const SColor &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool irr::video::SColor::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compares the color to another color. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if the colors are different, and false if they are the same. </dd></dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00319">319</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

</div>
</div>
<a class="anchor" id="a1cd25e0e67050af13a15515b7d2c8782"></a><!-- doxytag: member="irr::video::SColor::operator+" ref="a1cd25e0e67050af13a15515b7d2c8782" args="(const SColor &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> irr::video::SColor::operator+ </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds two colors, result is clamped to 0..255 values. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">other</td><td>Color to add to this color </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Addition of the two colors, clamped to 0..255 values </dd></dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00328">328</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00221">getAlpha()</a>, <a class="el" href="_s_color_8h_source.html#l00236">getBlue()</a>, <a class="el" href="_s_color_8h_source.html#l00231">getGreen()</a>, <a class="el" href="_s_color_8h_source.html#l00226">getRed()</a>, <a class="el" href="irr_math_8h_source.html#l00123">irr::core::min_()</a>, and <a class="el" href="_s_color_8h_source.html#l00207">SColor()</a>.</p>

</div>
</div>
<a class="anchor" id="a8e7944ddc658076a2933861a1b99f1e7"></a><!-- doxytag: member="irr::video::SColor::operator&lt;" ref="a8e7944ddc658076a2933861a1b99f1e7" args="(const SColor &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool irr::video::SColor::operator&lt; </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>comparison operator </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if this color is smaller than the other one </dd></dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00323">323</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

</div>
</div>
<a class="anchor" id="a68025038ef1c75c8b7ca64270216f79f"></a><!-- doxytag: member="irr::video::SColor::operator==" ref="a68025038ef1c75c8b7ca64270216f79f" args="(const SColor &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool irr::video::SColor::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compares the color to another color. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if the colors are the same, and false if not. </dd></dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00315">315</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

</div>
</div>
<a class="anchor" id="a8cf295c05c7406cc249843acbb31ec5f"></a><!-- doxytag: member="irr::video::SColor::set" ref="a8cf295c05c7406cc249843acbb31ec5f" args="(u32 a, u32 r, u32 g, u32 b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void irr::video::SColor::set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets all four components of the color at once. </p>
<p>Constructs the color from 4 values representing the alpha, red, green and blue components of the color. Must be values between 0 and 255. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">a,:</td><td>Alpha component of the color. The alpha component defines how transparent a color should be. Has to be a value between 0 and 255. 255 means not transparent (opaque), 0 means fully transparent. </td></tr>
    <tr><td class="paramname">r,:</td><td>Sets the red component of the Color. Has to be a value between 0 and 255. 0 means no red, 255 means full red. </td></tr>
    <tr><td class="paramname">g,:</td><td>Sets the green component of the Color. Has to be a value between 0 and 255. 0 means no green, 255 means full green. </td></tr>
    <tr><td class="paramname">b,:</td><td>Sets the blue component of the Color. Has to be a value between 0 and 255. 0 means no blue, 255 means full blue. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00307">307</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

</div>
</div>
<a class="anchor" id="a4966581260a89f10386bf9d06239c341"></a><!-- doxytag: member="irr::video::SColor::set" ref="a4966581260a89f10386bf9d06239c341" args="(u32 col)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void irr::video::SColor::set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>col</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00311">311</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

</div>
</div>
<a class="anchor" id="a7bfe4abc30d563668b947c8bdb055bab"></a><!-- doxytag: member="irr::video::SColor::setAlpha" ref="a7bfe4abc30d563668b947c8bdb055bab" args="(u32 a)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void irr::video::SColor::setAlpha </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the alpha component of the Color. </p>
<p>The alpha component defines how transparent a color should be. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>The alpha value of the color. 0 is fully transparent, 255 is fully opaque. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00259">259</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

</div>
</div>
<a class="anchor" id="a13d82e6b52d32f7394f3cce041dc2965"></a><!-- doxytag: member="irr::video::SColor::setBlue" ref="a13d82e6b52d32f7394f3cce041dc2965" args="(u32 b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void irr::video::SColor::setBlue </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>b</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the blue component of the Color. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">b,:</td><td>Has to be a value between 0 and 255. 0 means no blue, 255 means full blue. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00274">274</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

</div>
</div>
<a class="anchor" id="a381f2db0ed17c6b06ba5c8809dce3370"></a><!-- doxytag: member="irr::video::SColor::setData" ref="a381f2db0ed17c6b06ba5c8809dce3370" args="(const void *data, ECOLOR_FORMAT format)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void irr::video::SColor::setData </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceirr_1_1video.html#a1d5e487888c32b1674a8f75116d829ed">ECOLOR_FORMAT</a>&#160;</td>
          <td class="paramname"><em>format</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>set the color by expecting data in the given format </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">data,:</td><td>must point to valid memory containing color information in the given format </td></tr>
    <tr><td class="paramname">format,:</td><td>tells the format in which data is available </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00378">378</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00117">irr::video::A1R5G5B5toA8R8G8B8()</a>, <a class="el" href="_s_color_8h_source.html#l00447">color</a>, <a class="el" href="_s_color_8h_source.html#l00023">irr::video::ECF_A1R5G5B5</a>, <a class="el" href="_s_color_8h_source.html#l00032">irr::video::ECF_A8R8G8B8</a>, <a class="el" href="_s_color_8h_source.html#l00026">irr::video::ECF_R5G6B5</a>, <a class="el" href="_s_color_8h_source.html#l00029">irr::video::ECF_R8G8B8</a>, and <a class="el" href="_s_color_8h_source.html#l00128">irr::video::R5G6B5toA8R8G8B8()</a>.</p>

</div>
</div>
<a class="anchor" id="af80cfedd5e761216b8bed259963ac948"></a><!-- doxytag: member="irr::video::SColor::setGreen" ref="af80cfedd5e761216b8bed259963ac948" args="(u32 g)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void irr::video::SColor::setGreen </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>g</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the green component of the Color. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">g,:</td><td>Has to be a value between 0 and 255. 0 means no green, 255 means full green. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00269">269</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

</div>
</div>
<a class="anchor" id="a950c98714711ae9dd8c5219f83c07693"></a><!-- doxytag: member="irr::video::SColor::setRed" ref="a950c98714711ae9dd8c5219f83c07693" args="(u32 r)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void irr::video::SColor::setRed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a>&#160;</td>
          <td class="paramname"><em>r</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the red component of the Color. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">r,:</td><td>Has to be a value between 0 and 255. 0 means no red, 255 means full red. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00264">264</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

</div>
</div>
<a class="anchor" id="a9a6ad04081a1b15c07746cf84a971565"></a><!-- doxytag: member="irr::video::SColor::toA1R5G5B5" ref="a9a6ad04081a1b15c07746cf84a971565" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#ae9f8ec82692ad3b83c21f555bfa70bcc">u16</a> irr::video::SColor::toA1R5G5B5 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Calculates a 16 bit A1R5G5B5 value of this color. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>16 bit A1R5G5B5 value of this color. </dd></dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00278">278</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00097">irr::video::A8R8G8B8toA1R5G5B5()</a>, and <a class="el" href="_s_color_8h_source.html#l00447">color</a>.</p>

</div>
</div>
<a class="anchor" id="a0196acc3dfded9f6161c41f0065267c1"></a><!-- doxytag: member="irr::video::SColor::toOpenGLColor" ref="a0196acc3dfded9f6161c41f0065267c1" args="(u8 *dest) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void irr::video::SColor::toOpenGLColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceirr.html#a646874f69af8ff87fc10201b0254a761">u8</a> *&#160;</td>
          <td class="paramname"><em>dest</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Converts color to OpenGL color format. </p>
<p>From ARGB to RGBA in 4 byte components for endian aware passing to OpenGL </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">dest,:</td><td>address where the 4x8 bit OpenGL color is stored. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00284">284</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>References <a class="el" href="_s_color_8h_source.html#l00221">getAlpha()</a>, <a class="el" href="_s_color_8h_source.html#l00236">getBlue()</a>, <a class="el" href="_s_color_8h_source.html#l00231">getGreen()</a>, and <a class="el" href="_s_color_8h_source.html#l00226">getRed()</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a11f2b41eeff9e7f688d322735ca2cfcf"></a><!-- doxytag: member="irr::video::SColor::color" ref="a11f2b41eeff9e7f688d322735ca2cfcf" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804">u32</a> <a class="el" href="classirr_1_1video_1_1_s_color.html#a11f2b41eeff9e7f688d322735ca2cfcf">irr::video::SColor::color</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>color in A8R8G8B8 Format </p>

<p>Definition at line <a class="el" href="_s_color_8h_source.html#l00447">447</a> of file <a class="el" href="_s_color_8h_source.html">SColor.h</a>.</p>

<p>Referenced by <a class="el" href="_s_color_8h_source.html#l00221">getAlpha()</a>, <a class="el" href="_s_color_8h_source.html#l00236">getBlue()</a>, <a class="el" href="_s_color_8h_source.html#l00407">getData()</a>, <a class="el" href="_s_color_8h_source.html#l00231">getGreen()</a>, <a class="el" href="_s_color_8h_source.html#l00226">getRed()</a>, <a class="el" href="_s_color_8h_source.html#l00319">operator!=()</a>, <a class="el" href="_s_color_8h_source.html#l00323">operator&lt;()</a>, <a class="el" href="_s_color_8h_source.html#l00315">operator==()</a>, <a class="el" href="_s_color_8h_source.html#l00307">set()</a>, <a class="el" href="_s_color_8h_source.html#l00259">setAlpha()</a>, <a class="el" href="_s_color_8h_source.html#l00274">setBlue()</a>, <a class="el" href="_s_color_8h_source.html#l00378">setData()</a>, <a class="el" href="_s_color_8h_source.html#l00269">setGreen()</a>, <a class="el" href="_s_color_8h_source.html#l00264">setRed()</a>, and <a class="el" href="_s_color_8h_source.html#l00278">toA1R5G5B5()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_s_color_8h_source.html">SColor.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceirr.html">irr</a>      </li>
      <li class="navelem"><a class="el" href="namespaceirr_1_1video.html">video</a>      </li>
      <li class="navelem"><a class="el" href="classirr_1_1video_1_1_s_color.html">SColor</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">
<a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht 
Engine</a> Documentation &copy; 2003-2012 by Nikolaus Gebhardt. Generated on Sat Jul 9 2016 18:18:44 for Irrlicht 3D Engine by
<a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
